﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="Manage.aspx.cs" Inherits="Enterprise.UI.Web.Modules.OfficeDocument.Manage"
    ValidateRequest="false" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link rel="stylesheet" type="text/css" href="../../Styles/css/ssec-form.css" />
    <script charset="utf-8" src="../../kindeditor-4.1.1/kindeditor.js" type="text/javascript"></script>
    <script charset="utf-8" src="../../kindeditor-4.1.1/lang/zh_CN.js" type="text/javascript"></script>
    <script type="text/javascript">
        var editorcn;
        var editorru;
        var editorfile;
        KindEditor.ready(function (K) {
            editorcn = K.create('#t_Content', { uploadJson: '/kindeditor-4.1.1/upload/upload_json.ashx' });
            editorru = K.create('#t_ContentRu');
            editorfile = K.create('#tb_Files', { uploadJson: '/kindeditor-4.1.1/upload/upload_json.ashx', items: ['insertfile'] });
        });
        function openlist() {
            $('#rcv_users').window('open');
        }
        function closelist() {
            //关闭窗口
            $('#rcv_users').window('close');
            //获取所有选中的节点的子节点
            var node = $('#tt2').tree('getChecked');
            if (node) {
                var children = $('#tt2').tree('getChecked', node.target);
            } else {
                var children = $('#tt2').tree('getChecked');
            }
            var s = '';
            var c = 0;
            for (var i = 0; i < children.length; i++) {
                var v = children[i].id.toString();
                if (v.indexOf("d-") < 0) {
                    s += children[i].id + ',';
                    c++;
                }
            }
            $('#rcvuser_count').text(c);
            $('#rcv_users_value').attr('value', s);
            //开发时请注释alert
            //alert('选中的人员id:'+s);
        }
        $(function () {
            //初始化签收人个数
            var u = $('#rcv_users_value').val();
            if (u) {
                $('#rcvuser_count').text(u.split(',').length);
            }
            else
                $('#rcvuser_count').text(0);
            jQuery.ajaxSetup({ cache: false })
            $('#tt2').tree({
                lines: true,
                checkbox: true,
                url: '/Modules/Json/UserList.aspx?selected=' + $('#rcv_users_value').val(),
                onClick: function (node) {
                    $(this).tree('toggle', node.target);
                    //alert('you click '+node.text);
                },
                onContextMenu: function (e, node) {
                    e.preventDefault();
                    $('#tt2').tree('select', node.target);
                    $('#mm').menu('show', {
                        left: e.pageX,
                        top: e.pageY
                    });
                }
            });
        });
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainPH" runat="server">
    <div class="vDaohangtiaoHolder module">
        <div class="vDaohangtiao">
            <ul>
                <li class="first">
                    <a href="/index.aspx" title="首页">首页</a>
                </li>
                <li><a href="Index.aspx">公文流转</a></li>
                <li class="last"><%=NavString %>
                </li>
            </ul>
        </div>
    </div>
    <Ent:HeadMenuWeb ID="HeadMenu1" runat="server">
        <Ent:HeadMenuButtonItem ButtonIcon="back.gif" ButtonName="返回" ButtonUrl="Index.aspx"
            ButtonPopedom="List" ButtonUrlType="Href" />
    </Ent:HeadMenuWeb>
    <div id="contents" class="ssec-form">
        <div class="ssec-group ssec-group-hasicon">
            <img src="../../easyui1.2.6/themes/icons/application.png" alt="" /><span><%=NavString %></span>
        </div>
        <ul id="ul" runat="server">
            <li>
                <div class="ssec-label">
                    部门/单位：
                </div>
            </li>
            <li>
                <asp:Label ID="lb_Dept" runat="server"></asp:Label>
            </li>
            <li style="width: 30px;"></li>
            <li>
                <div class="ssec-label">
                    发布人：
                </div>
            </li>
            <li>
                <asp:Label ID="lb_User" runat="server"></asp:Label>
            </li>
        </ul>
        <ul id="ulTime" runat="server">
            <li>
                <div class="ssec-label">
                    来文时间：<span style="color: red; font-weight: bold;">*</span>
                </div>
            </li>
            <li>
                <div class="ssec-text normal">
                    <asp:TextBox ID="tb_FromTime" runat="server" CssClass="ssec-text-field  easyui-validatebox"
                        required="true"></asp:TextBox>
                </div>
            </li>
            <li style="width: 30px;"></li>
            <li>
                <div class="ssec-label">
                    发送人：<span style="color: red; font-weight: bold;">*</span>
                </div>
            </li>
            <li>
                <div class="ssec-text normal">
                    <asp:TextBox ID="tb_FromUser" runat="server" CssClass="ssec-text-field  easyui-validatebox"
                        required="true"></asp:TextBox>
                </div>
            </li>
        </ul>
        <ul id="ulFrom" runat="server">
            <li>
                <div class="ssec-label">
                    来文单位：<span style="color: red; font-weight: bold;">*</span>
                </div>
            </li>
            <li>
                <div class="ssec-text normal">
                    <asp:TextBox ID="tb_From" runat="server" CssClass="ssec-text-field  easyui-validatebox"
                        required="true"></asp:TextBox>
                </div>
            </li>
            <li style="width: 30px;"></li>
            <li>
                <div class="ssec-label">
                    公文编号：<span style="color: red; font-weight: bold;">*</span>
                </div>
            </li>
            <li>
                <div class="ssec-text normal">
                    <asp:TextBox ID="tb_FromCode" runat="server" CssClass="ssec-text-field  easyui-validatebox"
                        required="true"></asp:TextBox>
                </div>
            </li>
        </ul>
        <ul id="ul1" runat="server">
            <li>
                <div class="ssec-label">
                    公文类型：<span style="color: red; font-weight: bold;">*</span>
                </div>
            </li>
            <li>
                <div class="ssec-text normal">
                    <asp:DropDownList ID="tb_Type" runat="server" CssClass="ssec-text-field  easyui-validatebox"
                        required="true">
                        <asp:ListItem Text="总部文件" Value="总部文件"></asp:ListItem>
                        <asp:ListItem Text="FIOC行政" Value="FIOC行政"></asp:ListItem>
                        <asp:ListItem Text="FIOC生产" Value="FIOC生产"></asp:ListItem>
                    </asp:DropDownList>
                </div>
            </li>
            <li style="width: 30px;"></li>
            <li>
                <div class="ssec-label">
                    公文编号：<span style="color: red; font-weight: bold;">*</span>
                </div>
            </li>
            <li>
                <div class="ssec-text normal">
                    <asp:TextBox ID="tb_Code" runat="server" CssClass="ssec-text-field  easyui-validatebox"
                        required="true"></asp:TextBox>
                </div>
            </li>
        </ul>
        <ul>
            <li>
                <div class="ssec-label">
                    名称(中文)：<span style="color: red; font-weight: bold;">*</span>
                </div>
            </li>
            <li>
                <div class="ssec-text large">
                    <asp:TextBox ID="tb_Name" runat="server" CssClass="ssec-text-field  easyui-validatebox"
                        required="true"></asp:TextBox>
                </div>
            </li>
        </ul>
        <ul>
            <li>
                <div class="ssec-label">
                    名称(俄文)：<span style="color: red; font-weight: bold;">*</span>
                </div>
            </li>
            <li>
                <div class="ssec-text large">
                    <asp:TextBox ID="tb_RName" runat="server" CssClass="ssec-text-field  easyui-validatebox"
                        required="true"></asp:TextBox>
                </div>
            </li>
        </ul>
        <ul>
            <li>
                <div class="ssec-label">
                    公文说明(中文)：
                </div>
            </li>
            <li style="width: 100%;">
                <asp:TextBox ID="t_Content" ClientIDMode="Static" TextMode="MultiLine" runat="server"
                    CssClass="easyui-validatebox" Width="99%" validType="length[0,2000]"></asp:TextBox></li>
        </ul>
        <ul>
            <li>
                <div class="ssec-label">
                    公文说明(俄文)：
                </div>
            </li>
            <li style="width: 100%;">
                <asp:TextBox ID="t_ContentRu" ClientIDMode="Static" TextMode="MultiLine" runat="server"
                    CssClass="easyui-validatebox" Width="99%" validType="length[0,2000]"></asp:TextBox></li>
        </ul>
        <ul>
            <li>
                <div class="ssec-label">
                    附件：
                </div>
            </li>
            <li style="width: 100%;">
                <asp:TextBox ID="tb_Files" ClientIDMode="Static"
                    TextMode="MultiLine" runat="server" CssClass="easyui-validatebox" Width="99%"></asp:TextBox>
            </li>
        </ul>
        <ul id="ulJs" runat="server">
            <li>
                <div class="ssec-label">
                    接收人：
                </div>
            </li>
            <li>
                <asp:DropDownList ID="DeptUser" runat="server" class="easyui-validatebox" required="true">
                </asp:DropDownList>
            </li>
        </ul>
        <ul id="ulQs" runat="server">
            <li>
                <div class="ssec-label">签收人员：</div>
            </li>
            <li>
                <asp:HiddenField ID="rcv_users_value" runat="server" ClientIDMode="Static" />
                <%--签收列表--%>
                <a href="#" onclick="openlist();">签收人员列表</a>  |  已选择<span id="rcvuser_count"></span>
                位签收人</li>
        </ul>
        <div class="ssec-group-bottom ssec-group-hasicon">
            <asp:LinkButton ID="BtnSave" runat="server" OnClientClick="editorcn.sync();editorru.sync();editorfile.sync();return $('#form1').form('validate')&&confirm('确认提交吗？');"
                CssClass="easyui-linkbutton" OnClick="BtnSave_OnClick">提 交</asp:LinkButton>
        </div>
    </div>
    <div id="rcv_users" class="easyui-window" closed="true" modal="true" title="人员列表" style="width:180px;height:300px;">
        <ul id="tt2"></ul>
        <a href="#" onclick="closelist();"  class="easyui-linkbutton" >确定</a>
   </div>
</asp:Content>
